
from flask_script import Manager
from flask_script_demo import app 
from db_scripts import DBmanager

# 在终端执行: python manage.py command_name

manager = Manager(app)

# 和数据库相关的操作,放在一起.



@manager.command
def runserver():
    print('服务器运行中...')

manager.add_command('db',DBmanager)


if __name__ == "__main__":
    manager.run()
